﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MvcBase
{
    public interface IRepository: IDisposable
    {
        void Insert<E>(E entity) where E : class;

        void Update<E>(E entity) where E : class;

        void Delete<E>(E entity) where E : class;

        IQueryable<E> Select<E>() where E : class;

        E Select<E>(object key) where E : class;

        int SaveChanges();

        int SaveChanges(bool validateEntities);
    }
}
